#ifndef TASK_H
#define TASK_H

#include <QObject>
#include <QList>
#include <QStringList>

#include "taskassignee.h"

class Task : public QObject
{
    Q_OBJECT
public:
    enum TASK_ATTRIBUTE {
        GUID = 0,
        TITLE,
        DUEDATE,
        CREATOR,
        CREATOR_ID,
        MY_STATUS,
        TASK_STATUS,
        STATUS_STRING,

        DESCRIPTION = 10,
        TIME_CREATED,
        COMMENT_ON,
        OWNER_USER_NAME,
        OWNER_GUID,
        USER_ICON,
        MULTI_STEP,
        WEBURL,
        DUEDATE_CAPTION,
        ASSIGNEES_CAPTION,
        ACTIVE_STEP,
        HAS_FLAG
    };

    explicit Task();

    QString getAttributeValue(Task::TASK_ATTRIBUTE attr);
    QList<TaskAssignee *> *getAssignees();
signals:
    
public slots:
    void setAttribute(Task::TASK_ATTRIBUTE attr, const QString attrValue);
    void setAssignees(QList<TaskAssignee *> *list);
    void addAssignee(TaskAssignee *assignee);
private:
    // Attributes used by both task list and task details
    QString guid;
    QString title;
    QString dueDate;
    QString creator;
    QString creatorId;
    QString myStatus;
    QString taskStatus;
    QString statusString;

    // Attributes used only by task details
    QString description;
    QString timeCreated;
    QString commentOn;
    QString ownerUserName;
    QString ownerGuid;
    QString userIcon;
    QString multiStep;
    QString webUrl;
    QString dueDateCaption;
    QString assigneesCaption;
    QString activeStep;
    QString hasFlag;

    //
    QList<TaskAssignee *> *assignees;
};

#endif // TASK_H
